#{extends 'frame.html' /}

#{set title:'退款' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/widget.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/task/refound.css'}" />

#{/set}



<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#xe605;</span>

		买手任务退款

		&nbsp;&nbsp;&nbsp;&nbsp;

		<span class="grey">(建议：使用父任务ID进行筛选，按任务进行退款，不容易出错~~)</span>

		<a class="floatRight" href="/seller/tasks" style="color:#4083a9;">

			<span class="iconfont">&#x3433;</span>

			返回“我的任务”列表

		</a>

	</div>

	<div class="contentBody">

	<form id="queryForm">

		<div class="searchPanel">

			<span class="floatLeft mr-8">平台</span>

			<select class="floatLeft mr-8 platform">

			#{list items:platforms, as:'p'}

				<option value="${p}" ${selectedPlatform==p?'selected':''}>${p.title}</option>

			#{/list}

			</select>

			<span class="floatLeft">店铺</span>

			<select class="floatLeft mr-8" id="shop">

				<option value="">全部</option>

			</select>

			<span class="floatLeft">父任务ID</span>

			<input class="floatLeft mr-8" type="text" name="taskId" id="txtTaskId">

			<span class="floatLeft">订单号</span>

			<input class="floatLeft mr-8" type="text" name="order" id="orderId">

			<span class="floatLeft">买号</span>

			<input class="floatLeft mr-8" type="text" name="account" id="buyerAccountId">

			<span class="floatLeft">银行卡号</span>

			<input class="floatLeft mr-8" type="text" name="fundAccount" id="tenpayNo">

			<a class="stdColorButton low-button floatLeft" id="queryTask" href="javascript:;">查询</a>

		</div>

	</form>

		<div class="taskTypeSwitchWrapper">

			<a class="taskTab focus" href="javascript:;" id="waitRefund" status="WAIT_REFUND">待退款订单</a>

			<a class="taskTab" href="javascript:;" id="refunding" status="REFUNDING">已退款，待核实订单</a>

			<a class="taskTab" href="javascript:;" id="finished" status="FINISHED">已完成订单</a>

			<!-- <a class="taskTab" href="javascript:;">全部退款订单</a> -->

		</div>

		<form id="refundForm">

		<div class="taskWrapper" style="overflow: hidden;" id="taskContainer" sellerId="${user?.id}">

		</div>

		</form>

		<!--这里是分页区域-->

		<div class="taskPagination"></div>

		<div class="pagin-btm clearFix">

			<div class="pagination"></div>

		</div>

		<div class="popWrapper" style="display: none;" id="tr_loading_mask">

			<div class="maskLayer"></div>

			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />		

		</div>

	</div>

</div>

<textarea id="taskCellTemp" class="muban">

{{#results}}

	<div class="taskCell">

		<div class="title">

			<span class="shop mr-20"> <i class="plat_small {{platIcon}}"></i>

				{{shopName}}

			</span>

			<span class="">

				任务编号：

				<span>{{taskIdStr}}-{{id}}</span>

				<a href="/buyer/task/{{id}}" target="_blank" class="btnViewTask blue"  tid="{{id}}">[详情]</a>

			</span>

			<span class="floatRight">

				买手确认收货时间：

				<span>{{modifyTimeStr}}&nbsp;</span>

			</span>



		</div>



		<div class="body">

			<table class="normTable">

				<thead>

					<tr>

						<td class="item-list"></td>

						<td class="nick"></td>

						<td class="orderid"></td>

						<td class="buyer"></td>

						<td class="account"></td>

						<td class="price"></td>

					</tr>

				</thead>

				<tbody>

					<tr>

						<td class="item-list">

							<div class="item-box">

								<div class="pic">

									<img src="{{itemPic}}" />

								</div>

								<p class="title">{{itemTitle}}</p>

							</div>

							{{#additionalItemTitle}}

							<div class="item-box">

								<div class="pic">

									<img src="{{additionalItemPicUrl}}" />

								</div>

								<p class="title">{{additionalItemTitle}}</p>

							</div>

							{{/additionalItemTitle}}

						</td>

						<td class="nick">

							<em class="cap">买号</em>

							<span class="bold">{{buyerAccountNick}}</span>

						</td>

						<td class="orderid"> <em class="cap">订单号</em>

							<span class="bold green">{{orderId}}</span>

						</td>

						<td class="buyer">

							<em class="cap">收款人</em>

							<span class="bold">{{refundAccountUser}}</span>

						</td>

						<td class="account"><em class="cap">退款账号&nbsp;&nbsp;财付通</em>

							<span class="bold green">{{refundAccountNo}}</span>

						</td>

						<td class="price">

							<em class="cap">退款金额</em>

							<span class="bold red">{{price}}</span>&nbsp;&nbsp;元

						</td>

					</tr>

				</tbody>



			</table>



		</div>

		{{#isWaitRefund}}

		<div class="refound-panel">
			<!-- 
			<span class="floatLeft mr-8">填写退款的交易号</span>
			<input class="inputText floatLeft mr-8 required red bold transNo" type="text" name="transNo" />
 			-->
			<span class="refundBtnBox">
				<!-- 
				<a class="stdColorButton refundBtn floatLeft" href="javascript:;" oldId="{{id}}" buyerId="{{buyerId}}">确认已退款</a>
				 -->
				
				<a class="stdColorButton newRefundBtn floatLeft" href="javascript:;" oldId="{{id}}" buyerId="{{buyerId}}">发放佣金</a>
				
				<!-- 
				<a href="javascript:;" class="floatLeft qWhatOrderid">
					<span class="iconfont">&#xf0031;</span>
					什么是交易号?
				</a>
				 -->
			</span>

			<span class="okInfoBox" style="display:none">

				<span class="iconfont floatLeft" style="color:green">&#xf0156;</span>

				<span class="bold" style="color:#008000">&nbsp;&nbsp;已处理！</span>

			</span>

		</div>

		{{/isWaitRefund}}

		{{^isWaitRefund}}

		<div class="refound-panel">

			<span class="floatLeft mr-8">退款的交易号:</span>

			{{transNo}}

		</div>

		{{/isWaitRefund}}

	</div>

	{{/results}}

</textarea>

#{set 'moreScripts'}

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/task/refund.js'}" type="text/javascript"></script>

<script type="text/javascript">App.module = 'myTask';</script>

#{/set}